//
//  NetWorkEngine.h
//  MXApp
//
//  Created by ChenChao on 15/1/15.
//  Copyright (c) 2015年 YingXiang. All rights reserved.
//

#import "AFHTTPSessionManager.h"
#import "NetWorkRequestGroup.h"

@interface NetWorkEngine : AFHTTPSessionManager
@property(nonatomic, readonly) NetWorkRequestGroup* _Nonnull requestGroup;
+ (instancetype _Nonnull)sharedEngine;
- (NSURLSessionDataTask* _Nullable)
      POST:(NSString* _Nullable)URLString
parameters:(id _Nullable)parameters
  progress:(void (^_Nullable)(NSProgress* _Nonnull))uploadProgress
   success:(void (^_Nullable)(NSURLSessionDataTask* _Nonnull, id _Nullable))success
   failure:(void (^_Nullable)(NSURLSessionDataTask* _Nullable, NSError* _Nonnull))failure;
- (NSURLSessionDataTask* _Nullable)POST:(NSString* _Nullable)URLString
                             parameters:(id _Nullable)parameters
              constructingBodyWithBlock:(void (^_Nullable)(id<AFMultipartFormData> _Nonnull))block
                               progress:(void (^_Nullable)(NSProgress* _Nonnull))uploadProgress
                                success:(void (^_Nullable)(NSURLSessionDataTask* _Nonnull,
                                                           id _Nullable))success
                                failure:(void (^_Nullable)(NSURLSessionDataTask* _Nullable,
                                                           NSError* _Nonnull))failure;
- (NSURLSessionDataTask* _Nullable)
       GET:(NSString* _Nullable)URLString
parameters:(id _Nullable)parameters
  progress:(void (^_Nullable)(NSProgress* _Nonnull))downloadProgress
   success:(void (^_Nullable)(NSURLSessionDataTask* _Nonnull, id _Nullable))success
   failure:(void (^_Nullable)(NSURLSessionDataTask* _Nullable, NSError* _Nonnull))failure;
@end
